<%
dim id_r
server.ScriptTimeout = 99999999

set conn = Server.CreateObject("ADODB.Connection")
conn.Open "empa"
set rs1 = Server.CreateObject("ADODB.Recordset")

'Set conn = New ADODB.Connection
'Set rs1 = New ADODB.Recordset
'conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=eble;"
rs1.Open "SELECT * FROM aaldata WHERE aaldata.[Total Abundance] > 0",conn
'response.Write rs1("suma")
'response.End
'1.639.987
rs1.MoveFirst
Do While Not rs1.EOF
    id_r = rs1("ID") 
    Abundance = rs1("Total Abundance") 
    If Abundance > 0 Then
 
        SQL=  "INSERT INTO Tabla2 SELECT * FROM aaldata WHERE aalData.id = " & id_r & " "
        i=0
        For i =1 to Abundance
            conn.Execute(SQL)
        next i
        Response.Write id_r & "-" & Abundance & " &nbsp;&nbsp;&nbsp;" 
    End If
 rs1.MoveNext
 Loop
response.Write "FIN"
%>






